home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 July
/
CMCD0704.ISO
/
Software
/
Shareware
/
Comunicatii
/
feedaemon
/
fd110rc5.exe
/
{app}
/
Data
/
defaults
/
styles
/
Mega Gold.fdxsl
< prev
next >
Wrap
Extensible Markup Language
|
2004-05-30
|
4KB
|
143 lines
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
<xsl:output method="html"/>
<xsl:variable name="common-styles">
<style type="text/css">
body {
font: 140%/140% "Trebuchet MS", Tahoma, sans-serif;
margin: 20px 30px;
color: black;
background-color: #DFBE00;
filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#FFF1A1,endColorStr=#C6A900);
}
a { color: #847000; }
a:hover { color: #CC0500; }
span.nodescription { font-size: smaller; color: #594C00; }
div.newspapertitle {
font-size: larger;
text-transform: uppercase;
font-weight: bold;
margin-bottom: 16px;
border-bottom: 3px solid #C6A900;
}
div.newsitemfooter { font-size: x-small; font-style: italic; }
div.newsitemtitle {
font-weight: bold;
}
blockquote { font-style: italic; }
div.newsitemcontent {
margin-top: 20px;
}
div.newsitembreak {
border-top: 1px dotted #C6A900;
margin: 24px 0;
}
</style>
</xsl:variable>
<!-- channel group -->
<xsl:template match="newspaper[@type='group']">
<html>
<head>
<title>Group Newspaper</title>
<xsl:copy-of select="$common-styles"/>
<style type="text/css">
div.channelnewsitems {
border: 1px solid #C6A900;
padding: 8px 12px;
margin-bottom: 12px;
}
div.channeltitle {
border: 1px solid #C6A900;
border-bottom: none;
font-weight: bold;
text-transform: uppercase;
color: #534700;
text-align: center;
}
</style>
</head>
<body>
<xsl:variable name="newspapertype" select="@type"/>
<xsl:if test="title">
<div class="newspapertitle">
<xsl:value-of select="title" disable-output-escaping="yes"/>
</div>
</xsl:if>
<xsl:for-each select="channel">
<div class="channeltitle">
<xsl:value-of select="title"/>
</div>
<div class="channelnewsitems">
<xsl:for-each select="item">
<xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
<xsl:apply-templates select="."/>
<div class="newsitembreak"></div>
</xsl:for-each>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
<!-- news item and channel -->
<xsl:template match="newspaper[@type='newsitem' or @type='channel']">
<html>
<head>
<title>Newspaper</title>
<xsl:copy-of select="$common-styles"/>
</head>
<body>
<xsl:variable name="newspapertype" select="@type"/>
<xsl:if test="title">
<div class="newspapertitle">
<xsl:value-of select="title" disable-output-escaping="yes"/>
</div>
</xsl:if>
<xsl:for-each select="channel/item">
<xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
<xsl:apply-templates select="."/>
<xsl:if test="$newspapertype != 'newsitem'">
<div class="newsitembreak"></div>
</xsl:if>
</xsl:for-each>
</body>
</html>
</xsl:template>
<!-- news item template -->
<xsl:template match="item">
<div class="newsitem">
<div class="newsitemtitle">
<xsl:variable name="itemlink" select="link"/>
<a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
</div>
<div class="newsitemfooter">
<xsl:variable name="srclink" select="source/@htmlUrl"/>
<xsl:value-of select="fd:dateDisplay"/> | <a href="{$srclink}"><xsl:value-of select="source"/></a>
<!-- add link to comments if available -->
<xsl:if test="comments">
<xsl:variable name="commentlink" select="comments"/>
<xsl:variable name="commentimg" select="'$IMAGEDIR$comments.gif'"/>
| <a href="{$commentlink}"><img src="{$commentimg}" border="0" align="absmiddle" hspace="6"/></a>
</xsl:if>
<!-- add link to enclosure if available -->
<xsl:if test="enclosure">
<xsl:variable name="enclosurelink" select="enclosure/@url"/>
<xsl:variable name="enclosureimg" select="'$IMAGEDIR$enclosure.gif'"/>
| <a href="{$enclosurelink}"><img src="{$enclosureimg}" align="absmiddle" border="0" hspace="6"/></a>
</xsl:if>
</div>
<div class="newsitemcontent">
<xsl:value-of select="description" disable-output-escaping="yes"/>
</div>
</div>
</xsl:template>
</xsl:stylesheet>